package com.liu.sx.dao;

import com.liu.sx.entity.Driver;
import com.liu.sx.entity.DriverLogin;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

public interface DriverLoginDao extends JpaRepository<DriverLogin,String> , JpaSpecificationExecutor<DriverLogin> {

   @Query(value = "select d from DriverLogin d where d.address like  concat('%',:query,'%') ")
    Page<DriverLogin> findAll(@Param("query") String query , Pageable pageable);

}
